package com.itheima;

import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/*@SpringBootApplication
//@EnableEurekaClient //声明是一个eureka 客户端,仅支持eureka
@EnableDiscoveryClient //支持zk、eureka、nacos、apollo
@EnableCircuitBreaker //开启熔断器 */
@SpringCloudApplication //一个顶三
public class ConsumerServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(ConsumerServiceApplication.class, args);
    }

    @Bean
    @LoadBalanced //使用ribbon
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
